feat(verify): TPM attestation measurement verification - #133
Merged
Merged
Conversation
Implement measurement-format validation and TPM2B_ATTEST parsing in cmcp_verify.tpm, wire into verify_trace_claim for the tpm2 platform path, and add mypy coverage for src/cmcp_verify. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/cmcp_verify/tpm.pywithverify_tpm_measurement()implementing issue [verify] TPM attestation verification in cmcp-verify #62: validates thesha256:<64-hex>measurement format and parses TPM2B_ATTEST blobs (magic check, qualifying_data extraction and SHA-256 verification againsttee_public_key_hex || session_id)tpm2platform intoverify_trace_claim()replacing the stub; software-only mode and other platforms are unaffectedsrc/cmcp_verifyto mypyfileslist inpyproject.tomltests/unit/test_tpm_verify.py; all 195 tests passCloses #62
Test plan
python -m ruff check src/ tests/— cleanpython -m bandit -r src/ -c pyproject.toml— no issuespython -m mypy src/cmcp_gateway/ src/cmcp_verify/— no issuespython -m pytest tests/— 195 passed🤖 Generated with Claude Code